import { DialogForm } from 'custom/index'
import ExNameItem from '@/views/menus/sub-account-distribution/components/ExNameItem.vue'
import Xzkf from '../components/Xzkf.vue'
import { postZzhFpkf } from '../api'
import Fpdx from '../components/Fpdx.vue'

const zzhFpKfDialog = new DialogForm('DialogForm')

zzhFpKfDialog
    .width('30%')
    .getApi(async (_, row) => {
        return row;
    })
    .postApi(postZzhFpkf)
    .useGroup('分配信息')
    .useCustomItem(ExNameItem, 'companyNo').label('分部公司').required().end()
    .useCustomItem(Xzkf, 'kfUserId').label('选择客服').required().end()
    .useDatePicker('ksrq').label('开始日期').required().end()
    .useDatePicker('jsrq').label('结束日期').required().end()
    .useItem('fpgsDx').label('分配公司底薪').setProp('disabled', true).end()
    .useCustomItem(Fpdx, 'fpkfDx').label('分配客服底薪').required().end()
    .useItem1('tcbl').label('提成比例').required().end()

export { zzhFpKfDialog }